<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        img{
            width: 400px;
            height: auto;
            animation: heart 0.5s infinite;
            /* 一个叫heart的动画 每0.5秒执行一次 */
        }
        div{
            height: 100px;
            width: 100px;
            background-color: pink;
            margin:100px  auto;
            animation: heart 0.5s infinite;
        }
        @keyframes heart{
            0%{
                transform: scale(1);
            }

            50%{
                transform: scale(1.1);
            }

            100%{
                transform: scale(1);
            }
        }
    </style>
</head>
<body>
    <img src="images/1.jpg" alt="">
    <div>

    </div>
</body>
</html>